#include <iostream>

using namespace std;
#if 0
template<class T>

T Add(T right,T left)
{
    return right + left;
}
#endif

template<class T>
class SeqList
{
    public:
        SeqList(size_t capacity = 10)
            :array_(new T[3+capacity])
            ,size_(0),
            capacity_(capacity+3)
        {}
        ~SeqList()
        {
            
        }

        void Push(T num)
        {
            if(size_>capacity_)
            {
                return;
            }
            array_[size_] = num;
            size_++;
        }

        void Pop()
        {
            size_--;
        }

        int& Size()
        {
            return size_;
        }

        void Show()
        {
            for(size_t i = 0;i < size_;i++)
            {
                cout << array_[i] << endl;
            }
        }

    private:
        T* array_;
        size_t size_;
        size_t capacity_;
};

int main()
{
   //cout << Add(1,2) << endl;
   //cout << Add<double>(1.2,2.3) << endl;
    SeqList<int> s;
    s.Push(1);
    s.Push(2);
    s.Push(3);  
    s.Show();
    
    return 0;

}
